<template>
	<!-- 顶部导航栏 -->
  <div class="stu" >
       <div class="img"><img src="../assets/logo_202012290958032.png" alt=""></div>
	   <div class="tab_box">
		   <div class="tabs" v-for="(i,index) in tabdata" @click.stop="go(index)" @mousemove.stop='pd(index)' :style="{borderBottom:($store.state.indexof==index)?'2px solid rgba(62,52,85,1)':'none'}">{{i.text}}</div>
	       <div class="xiabox" v-show="$store.state.indexshow">
			   <div class="tabc" @mousemove.stop='da(index)' :style="{backgroundColor:(num==index)?'#200128':'white',color:(num==index)?'white':'#3e3455'}" v-for="(i,index) in tac" @click="xia(index)">{{i.text}}</div>
		   </div>
	   </div>
  </div>
</template>

<script>

export default {
  name: 'stu',
  components: {},//声明子组件
  computed:{},
  data(){
	  return {
		  tabdata:[
			  {text:'首页',path:'/'},
			  {text:'关于我们',path:'/gywm'},
			  {text:'产品中心',path:''},
			  {text:'案例展示',path:'/alzs'},
			  {text:'AGV详情',path:'/AGVxq'},
			  {text:'项目详情',path:'/xmxq'},
              {text:'新闻中心',path:'/xwzx'},
			  // {text:'体验大厅',path:'/tydt'},
			  {text:'联系我们',path:'/lxwm'}
		  ],
		  indexof:0,
		  
		  tac:[
			  {text:'AGV',path:'/cpzx'},
			  {text:'非标自动化设备',path:'/cpzx'},
			  {text:'立体库',path:'/cpzx'},
			  {text:'配件',path:'/cpzx'},
			  {text:'智慧物联',path:'/cpzx'},
			  {text:'控制系统',path:'/cpzx'},
			  ],
		  num:'o',
		  itme: 0,

	  }
  },
  methods:{
      pd(index){
          this.$store.state.indexshow = index==2?true:false;
      },
	 go(index){//鼠标点击
		 this.$store.state.indexof = index;
		 // this.$router.push({path:this.tabdata[index].path,query:{'index':0}});
         this.$store.state.index = 0;
         this.$router.push({path:this.tabdata[index].path});

	 },
	 da(index){
		 this.num = index;
	 },
	 xia(index){//下标点击
		 // this.$router.push({path:this.tac[index].path,query:{'index':index}});
         this.$store.state.index = index;
         this.$router.push({path:this.tac[index].path});
	 }
  },
  mounted(){
  }
}
</script>
<style scoped="scoped">
	.tabc{
		width:100%;
		height:40px;
		line-height: 40px;
		text-align: center;
		font-size: 14px;
		color:#3e3455;
	}
	.xiabox{
		width:100px;
		position: absolute;
		left:200px;
		bottom:-238px;
		z-index: 999;
	}
	.tabs{
		width:100px;
		height: 100%;
		text-align: center;
		line-height: 110px;
		font-size: 16px;
		color: #3e3455;
		float: left;
	}
	
	
	.tab_box{
		width: 900px;
		height: 100%;
		float: right;
		position: relative;
	}
	
	.stu{
		width:1100px;
		height: 104px;
		margin: 0 auto;
	}
	.img img{
		width:100%;
		height:100%;
	}
	.img{
		width: 88px;
		height: 68px;
		/* background:red; */
		margin-top: 20px;
		float: left;
	}
	
</style>
